package com.bailiban.service.impl;

import com.bailiban.entity.YesterdayIncreased;
import com.bailiban.repository.YesterdayIncreasedRepository;
import com.bailiban.service.YesterDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author zhulang
 * @Classname YesterDayServiceImpl
 * @Description TODO
 * @Date 2020/2/18 14:11
 */
@Service
public class YesterDayServiceImpl implements YesterDayService {
    @Autowired
    private YesterdayIncreasedRepository yesterdayIncreasedRepository;
    @Override
    public YesterdayIncreased findYesterDayByProvinceIdAndDate(Date date, Integer provinceId) {
        YesterdayIncreased yesDayIncreased = yesterdayIncreasedRepository.findByDateAndProvinceCov_ProvinceId(date,provinceId);
        return yesDayIncreased;
    }
}
